package feedCons;

abstract class Animal {
	private String animalKind;
	private String food;
	public Animal(){
		
	}
	public Animal(String animalKind,String food){
		this.animalKind=animalKind;
		this.food=food;
	}
	public String getAnimalKind() {
		return animalKind;
	}
	public void setAnimalKind(String animalKind) {
		this.animalKind = animalKind;
	}
	public String getFood() {
		return food;
	}
	public void setFood(String food) {
		this.food = food;
	}
	public abstract void eat();
}
class Lion extends Animal{
	private String name;
	public Lion(){
		
	}
	public Lion(String animalKind,String food,String name){
		super(animalKind,food);
		this.name=name;
	}
	public void eat(){
		
		System.out.println("the Lion:"+this.name+" eat "+super.getFood());
	}
}
class Monkey extends Animal{
	private String name;
	private int num;
	static int count;
	static{
		count=0;
	}
	public Monkey(){
		
	}
	public Monkey(String animalKind,String food,String name){
		super(animalKind,food);
		setNum(count++);
		this.name=name;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getNum() {
		return num;
	}
	public void setNum(int num) {
		this.num = num;
	}
	public void eat(){
		
		System.out.println("the Mongkey: "+this.name+" "+this.num+" eat "+super.getFood());
	}
}
class Pigeon extends Animal{
	private String name;
	private int numb;
	static int icount;
	static{
		icount=1000;
	}
	public Pigeon(){
		
	}
	public Pigeon(String animalKind,String food,String name){
		super(animalKind,food);
		setNumb(icount++);
		this.name=name;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getNumb() {
		return numb;
	}
	public void setNumb(int numb) {
		this.numb = numb;
	}
	public void eat(){
		
		System.out.println("the Pigeon: "+this.name+" "+this.numb+" eat "+super.getFood());
	}
}
